﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using xn;

namespace KinectAPI
{
    public class UsersEventArgs : EventArgs
    {
        
        #region Properties

        /// <summary>
        /// Users skeletons list
        /// </summary>
        public readonly LinkedList<UserSkeleton> users;

        #endregion

        #region Constructors

        /// <summary>
        /// Creates a new instance of UsersEventArgs with the nodes position specified
        /// </summary>
        /// <param name="_joints">The nodes</param>
        public UsersEventArgs(Dictionary<uint, Dictionary<xn.SkeletonJoint, xn.SkeletonJointPosition>> _joints)
        {
            users = new LinkedList<UserSkeleton>();
            foreach (KeyValuePair<uint, Dictionary<xn.SkeletonJoint, xn.SkeletonJointPosition>> pair in _joints)
            {
                users.AddLast(new UserSkeleton(pair.Key, pair.Value));
            }
        }

        #endregion

    }
}
